Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Stringify automated registration errors #2340

Merged

Conversation

taratatach
Copy link
Member

@taratatach taratatach commented Aug 2, 2024

When cozy-stack returns an error response to an OAuth authorization
request, we throw a Javascript error with the response body.

However, when the body is a JSON object, we only get its type in the
error message rather than the content itself.
By stringifying the body, we make sure its content will be included in
the error message and thus displayed in the logs or console.

Please make sure the following boxes are checked:

  • PR is not too big
  • it improves UX & DX in some way
  • it includes unit tests matching the implementation changes
  • it includes scenarios matching a new behaviour or has been manually tested
  • it includes relevant documentation

@taratatach taratatach self-assigned this Aug 2, 2024
@taratatach taratatach force-pushed the ci/format-automated-registration-errors-for-logging branch from 1d03418 to 60fcf1d Compare August 2, 2024 14:48
Base automatically changed from fix/chokidar-handles-deletion-and-move-after-complete-move to master August 2, 2024 16:01
@taratatach taratatach marked this pull request as ready for review August 2, 2024 16:02
@taratatach taratatach force-pushed the ci/format-automated-registration-errors-for-logging branch from 60fcf1d to 884398e Compare August 2, 2024 16:02
@taratatach taratatach force-pushed the ci/format-automated-registration-errors-for-logging branch from 884398e to 7da5f2f Compare September 9, 2024 15:09
  When `cozy-stack` returns an error response to an OAuth authorization
  request, we throw a Javascript error with the response body.

  However, when the body is a JSON object, we only get its type in the
  error message rather than the content itself.
  By stringifying the body, we make sure its content will be included in
  the error message and thus displayed in the logs or console.
@taratatach taratatach force-pushed the ci/format-automated-registration-errors-for-logging branch from 7da5f2f to 22b5458 Compare September 10, 2024 16:31
@taratatach taratatach merged commit 0ef6a3a into master Sep 11, 2024
13 of 16 checks passed
@taratatach taratatach deleted the ci/format-automated-registration-errors-for-logging branch September 11, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant